{% extends '../admin/layout.html' %}

{% block scripts %}
<script src="/js/forum_edit.js"></script>
{% endblock %}

{% block content %}
<form method="post" action="/forum/update" id="forum-edit-form">
  <fieldset>
    <legend>編輯討論區</legend>
    <ul>
      <li class="form-field">
        <select id="forum-key" name="forum[key]">
          <option value="-1">-- 選擇討論區 --</option>{% for f in forums %}
          <option value="{{ f.key }}">{{ f.title }}</option>{% endfor %}
        </select>
      </li>
      <li class="form-field">
        <label class="form-label" for="forum-title">討論區標題</label><br>
        <input type="text" name="forum[title]" id="forum-title" size="30">
      </li>
      <li class="form-field">
        <label class="form-label" for="forum-summary">討論區敘述</label><br>
        <textarea name="forum[summary]" id="forum-summary" rows="5" cols="50"></textarea>
      </li>
      <li class="form-field">
        <label for="forum-permalink" class="form-label">永久連結</label><br>
        <input type="text" disabled id="forum-permalink" size="30">
      </li>
      <li class="form-field">
        <input type="submit" value="確定編輯" disabled>
      </li>      
    </ul>
  </fieldset>
</form>
{% endblock %}
